Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP JENKINS-56448 Report of the time spent in each phase of the Maven build (compile, test...) #222

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cyrille-leclerc
Copy link
Contributor

JENKINS-56448 Introduce a report of the time spent in each phase of the Maven build (compile, test...)

@cyrille-leclerc
Copy link
Contributor Author

cyrille-leclerc commented Jun 27, 2019

⚠️ some fragment of the build that take time are not attached to a life cycle phase, we see it with findbugs-maven-plugin:findbugs (findbugs), it's probably because this fragment of the build happens on a "fork"

Providing details of each phase works quite well but the chronology/order of phases is messed up on multi module Maven projects.

Sample with a multi module jar with ./mvnw clean source:jar deploy

 * clean --- 0s
   * maven-clean-plugin:clean (clean - default-clean) @ demo-parent --- 0s
   * maven-clean-plugin:clean (clean - default-clean) @ shared-core --- 0s
   * maven-clean-plugin:clean (clean - default-clean) @ demo-1 --- 0s
   * maven-clean-plugin:clean (clean - default-clean) @ demo-2 --- 0s
 *  --- 21s
   * maven-source-plugin:jar ( - default-cli) @ demo-parent --- 0s
   * maven-source-plugin:jar ( - default-cli) @ shared-core --- 0s
   * findbugs-maven-plugin:findbugs ( - findbugs) @ shared-core --- 10s
   * maven-source-plugin:jar ( - default-cli) @ demo-1 --- 0s
   * findbugs-maven-plugin:findbugs ( - findbugs) @ demo-1 --- 6s
   * maven-source-plugin:jar ( - default-cli) @ demo-2 --- 0s
   * findbugs-maven-plugin:findbugs ( - findbugs) @ demo-2 --- 5s
 * install --- 0s
   * maven-install-plugin:install (install - default-install) @ demo-parent --- 0s
   * maven-install-plugin:install (install - default-install) @ shared-core --- 0s
   * maven-install-plugin:install (install - default-install) @ demo-1 --- 0s
   * maven-install-plugin:install (install - default-install) @ demo-2 --- 0s
 * deploy --- 33s
   * maven-deploy-plugin:deploy (deploy - default-deploy) @ demo-parent --- 4s
   * maven-deploy-plugin:deploy (deploy - default-deploy) @ shared-core --- 8s
   * maven-deploy-plugin:deploy (deploy - default-deploy) @ demo-1 --- 9s
   * maven-deploy-plugin:deploy (deploy - default-deploy) @ demo-2 --- 9s
 * initialize --- 1s
   * jacoco-maven-plugin:prepare-agent (initialize - default-prepare-agent) @ shared-core --- 1s
   * jacoco-maven-plugin:prepare-agent (initialize - default-prepare-agent) @ shared-core --- 0s
   * jacoco-maven-plugin:prepare-agent (initialize - default-prepare-agent) @ demo-1 --- 0s
   * jacoco-maven-plugin:prepare-agent (initialize - default-prepare-agent) @ demo-1 --- 0s
   * jacoco-maven-plugin:prepare-agent (initialize - default-prepare-agent) @ demo-2 --- 0s
   * jacoco-maven-plugin:prepare-agent (initialize - default-prepare-agent) @ demo-2 --- 0s
 * process-resources --- 0s
   * maven-resources-plugin:resources (process-resources - default-resources) @ shared-core --- 0s
   * maven-resources-plugin:resources (process-resources - default-resources) @ demo-1 --- 0s
   * maven-resources-plugin:resources (process-resources - default-resources) @ demo-2 --- 0s
 * compile --- 1s
   * maven-compiler-plugin:compile (compile - default-compile) @ shared-core --- 1s
   * maven-compiler-plugin:compile (compile - default-compile) @ demo-1 --- 0s
   * maven-compiler-plugin:compile (compile - default-compile) @ demo-2 --- 0s
 * process-test-resources --- 0s
   * maven-resources-plugin:testResources (process-test-resources - default-testResources) @ shared-core --- 0s
   * maven-resources-plugin:testResources (process-test-resources - default-testResources) @ demo-1 --- 0s
   * maven-resources-plugin:testResources (process-test-resources - default-testResources) @ demo-2 --- 0s
 * test-compile --- 0s
   * maven-compiler-plugin:testCompile (test-compile - default-testCompile) @ shared-core --- 0s
   * maven-compiler-plugin:testCompile (test-compile - default-testCompile) @ demo-1 --- 0s
   * maven-compiler-plugin:testCompile (test-compile - default-testCompile) @ demo-2 --- 0s
 * test --- 18s
   * maven-surefire-plugin:test (test - default-test) @ shared-core --- 0s
   * maven-surefire-plugin:test (test - default-test) @ demo-1 --- 10s
   * maven-surefire-plugin:test (test - default-test) @ demo-2 --- 8s
 * package --- 3s
   * maven-jar-plugin:jar (package - default-jar) @ shared-core --- 1s
   * maven-jar-plugin:jar (package - default-jar) @ demo-1 --- 0s
   * spring-boot-maven-plugin:repackage (package - repackage) @ demo-1 --- 1s
   * maven-jar-plugin:jar (package - default-jar) @ demo-2 --- 0s
   * spring-boot-maven-plugin:repackage (package - repackage) @ demo-2 --- 0s
 * verify --- 0s
   * findbugs-maven-plugin:check (verify - findbugs) @ shared-core --- 0s
   * findbugs-maven-plugin:check (verify - findbugs) @ demo-1 --- 0s
   * findbugs-maven-plugin:check (verify - findbugs) @ demo-2 --- 0s

####
 * clean --- 0s
 *  --- 21s
 * install --- 0s
 * deploy --- 33s
 * initialize --- 1s
 * process-resources --- 0s
 * compile --- 1s
 * process-test-resources --- 0s
 * test-compile --- 0s
 * test --- 18s
 * package --- 3s
 * verify --- 0s
phases:12, mojoExecutions:48

@cyrille-leclerc
Copy link
Contributor Author

cyrille-leclerc commented Jun 27, 2019

Cyrille and Arnaud

Don't aggregate the phases

 ****************
 * clean --- 0s
   * maven-clean-plugin:clean (clean - default-clean) @ demo-parent --- 0s
   * maven-clean-plugin:clean (clean - default-clean) @ shared-core --- 0s
   * maven-clean-plugin:clean (clean - default-clean) @ demo-1 --- 0s
   * maven-clean-plugin:clean (clean - default-clean) @ demo-2 --- 0s
 *  --- 21s
   * maven-source-plugin:jar ( - default-cli) @ demo-parent --- 0s
   * maven-source-plugin:jar ( - default-cli) @ shared-core --- 0s
   * findbugs-maven-plugin:findbugs ( - findbugs) @ shared-core --- 10s
   * maven-source-plugin:jar ( - default-cli) @ demo-1 --- 0s
   * findbugs-maven-plugin:findbugs ( - findbugs) @ demo-1 --- 6s
   * maven-source-plugin:jar ( - default-cli) @ demo-2 --- 0s
   * findbugs-maven-plugin:findbugs ( - findbugs) @ demo-2 --- 5s
 * install --- 0s
   * maven-install-plugin:install (install - default-install) @ demo-parent --- 0s
   * maven-install-plugin:install (install - default-install) @ shared-core --- 0s
   * maven-install-plugin:install (install - default-install) @ demo-1 --- 0s
   * maven-install-plugin:install (install - default-install) @ demo-2 --- 0s
 * deploy --- 33s
   * maven-deploy-plugin:deploy (deploy - default-deploy) @ demo-parent --- 4s
   * maven-deploy-plugin:deploy (deploy - default-deploy) @ shared-core --- 8s
   * maven-deploy-plugin:deploy (deploy - default-deploy) @ demo-1 --- 9s
   * maven-deploy-plugin:deploy (deploy - default-deploy) @ demo-2 --- 9s
 * initialize --- 1s
   * jacoco-maven-plugin:prepare-agent (initialize - default-prepare-agent) @ shared-core --- 1s
   * jacoco-maven-plugin:prepare-agent (initialize - default-prepare-agent) @ shared-core --- 0s
   * jacoco-maven-plugin:prepare-agent (initialize - default-prepare-agent) @ demo-1 --- 0s
   * jacoco-maven-plugin:prepare-agent (initialize - default-prepare-agent) @ demo-1 --- 0s
   * jacoco-maven-plugin:prepare-agent (initialize - default-prepare-agent) @ demo-2 --- 0s
   * jacoco-maven-plugin:prepare-agent (initialize - default-prepare-agent) @ demo-2 --- 0s
 * process-resources --- 0s
   * maven-resources-plugin:resources (process-resources - default-resources) @ shared-core --- 0s
   * maven-resources-plugin:resources (process-resources - default-resources) @ demo-1 --- 0s
   * maven-resources-plugin:resources (process-resources - default-resources) @ demo-2 --- 0s
 * compile --- 1s
   * maven-compiler-plugin:compile (compile - default-compile) @ shared-core --- 1s
   * maven-compiler-plugin:compile (compile - default-compile) @ demo-1 --- 0s
   * maven-compiler-plugin:compile (compile - default-compile) @ demo-2 --- 0s
 * process-test-resources --- 0s
   * maven-resources-plugin:testResources (process-test-resources - default-testResources) @ shared-core --- 0s
   * maven-resources-plugin:testResources (process-test-resources - default-testResources) @ demo-1 --- 0s
   * maven-resources-plugin:testResources (process-test-resources - default-testResources) @ demo-2 --- 0s
 * test-compile --- 0s
   * maven-compiler-plugin:testCompile (test-compile - default-testCompile) @ shared-core --- 0s
   * maven-compiler-plugin:testCompile (test-compile - default-testCompile) @ demo-1 --- 0s
   * maven-compiler-plugin:testCompile (test-compile - default-testCompile) @ demo-2 --- 0s
 * test --- 18s
   * maven-surefire-plugin:test (test - default-test) @ shared-core --- 0s
   * maven-surefire-plugin:test (test - default-test) @ demo-1 --- 10s
   * maven-surefire-plugin:test (test - default-test) @ demo-2 --- 8s
 * package --- 3s
   * maven-jar-plugin:jar (package - default-jar) @ shared-core --- 1s
   * maven-jar-plugin:jar (package - default-jar) @ demo-1 --- 0s
   * spring-boot-maven-plugin:repackage (package - repackage) @ demo-1 --- 1s
   * maven-jar-plugin:jar (package - default-jar) @ demo-2 --- 0s
   * spring-boot-maven-plugin:repackage (package - repackage) @ demo-2 --- 0s
 * verify --- 0s
   * findbugs-maven-plugin:check (verify - findbugs) @ shared-core --- 0s
   * findbugs-maven-plugin:check (verify - findbugs) @ demo-1 --- 0s
   * findbugs-maven-plugin:check (verify - findbugs) @ demo-2 --- 0s

####
 * clean --- 0s
 *  --- 21s
 * install --- 0s
 * deploy --- 33s
 * initialize --- 1s
 * process-resources --- 0s
 * compile --- 1s
 * process-test-resources --- 0s
 * test-compile --- 0s
 * test --- 18s
 * package --- 3s
 * verify --- 0s
phases:12, mojoExecutions:48

conclusion: NOT aggregating phases is probably simpler and more efficient.

@aheritier aheritier added the wip label Aug 8, 2020
@aheritier aheritier marked this pull request as draft August 8, 2020 13:19
@aheritier aheritier self-assigned this Aug 8, 2020
@aheritier aheritier removed their assignment Aug 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants